﻿using System;
using Assist;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace YJKArch.DimensionModule
{
	[Regeneration(RegenerationOption.Manual)]
	[Transaction(TransactionMode.Manual)]
	public class CmdPtByPtDim : YJKCommandAuto
	{
		protected override Result YJKExcute(ExternalCommandData cmdData, ref string message, ElementSet elements)
		{
			Result result;
			try
			{
				result = new DimensionCreator(this.m_uiApp).PtByPtDim(ref message);
			}
			catch (Exception ex)
			{
				message += ex.ToString();
				result = Autodesk.Revit.UI.Result.Failed;
			}
			return result;
		}
	}
}
